package com.situ.ssm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.ssm.entity.Department;
import com.situ.ssm.entity.Role;
import com.situ.ssm.entity.User;
import com.situ.ssm.entity.UserRoleDepartment;
import com.situ.ssm.entity.UserSearchBO;

public interface UserMapper {

	public List<UserRoleDepartment> selectAll(@Param(value = "offset")int offset, @Param(value = "limit")Integer limit, @Param(value = "userSearchBO")UserSearchBO userSearchBO);

	public int selectTotalCount(UserSearchBO userSearchBO);

	public List<Role> selectRole();

	public List<Department> selectDepartment();

	public User selectId(Integer id);

	public List<Integer> selectRoleIdByUser(Integer id);

	public int insert(User user);

	public int selectGetId(String email);

	public void insertUR(@Param(value = "userId")int userId, @Param(value = "roleId")int roleId);

	public int delete(Integer id);

	public void deleteUR(Integer id);

	public int update(User user);

}
